import {FontSize, FontStyle, FontWeight} from './FontExtraState';
import {IconFont, FontFactory} from './Font';
import separate from '../patternSeparator';

separate('享元模式');

let size_12 = new FontSize(12);
let size_30 = new FontSize(30);
let size_11 = new FontSize(11);
let style_italic = new FontStyle('italic');
let style_normal = new FontStyle('normal');
let style_oblique = new FontStyle('oblique');
let weight_100 = new FontWeight(100);
let weight_200 = new FontWeight(200);

let char_a = FontFactory.getFont('a');
char_a.render(size_12, style_italic, weight_100);
char_a.render(size_30, style_normal, weight_200);

let char_b = FontFactory.getFont('b');
char_b.render(size_30, style_italic, weight_100);

let character = FontFactory.getFont('a');
character.render(size_11, style_oblique, weight_200);

// 可复用的图标字体
let icon = new IconFont(1002, '1 to 1 to 2', size_12, style_normal, weight_100);
icon.render();
icon.render();
icon.setState(size_30, style_oblique, weight_200);
icon.render();